import request from '@/utils/request'

//获取图片的数据
export const reqSpuImageList=(spuId)=>request({url:`/admin/product/spuImageList/${spuId}`,method:'get'});

//获取销售属性的数据
export const reqSpuSaleAttrList=(spuId)=>request({url:`/admin/product/spuSaleAttrList/${spuId}`,method:'get'});

//获取平台属性的数据
export const reqAttrInfoList=(category1Id,category2Id,category3Id)=>request({url:`/admin/product/attrInfoList/${category1Id}/${category2Id}/${category3Id}`,method:'get'});

//添加SKU的接口
export const reqAddSku=(skuInfo)=>request({url:'/admin/product/saveSkuInfo',method:'post',data:skuInfo});

//sku列表的接口
export const reqSkuList=(page,limit)=>request({url:`/admin/product/list/${page}/${limit}`,method:'get'});

//sku表格数据中的上架的接口
export const reqUpSale=(skuId)=>request({url:`/admin/product/onSale/${skuId}`,method:'get'});

//sku表格数据中的下架的接口
export const reqDownSale=(skuId)=>request({url:`/admin/product/cancelSale/${skuId}`,method:'get'});

//获取sku详情的接口
export const reqSkuById=(skuId)=>request({url:`/admin/product/getSkuById/${skuId}`,method:'get'});